<?php
namespace app\nadmin\controller;
use think\Controller;
use think\facade\Request;
use think\facade\Hook;
use think\facade\Cookie;
use think\facade\Session;

class Base extends Controller
{
    //当前管理员的数据
    protected $adminInfo = [];
    //当前管理员id
    protected $adminerId = 0;
    public function __construct()
    {

        Hook::exec('app\\nadmin\\controller\\Islogin'); //钩子进行权限验证和是否登陆验证
        parent::__construct();
        //当前管理员的信息数据
        $this->adminerId = Cookie::get("adminerId");
        if($this->adminerId) $this->adminInfo =Session::get("adminerInfo_".$this->adminerId);
    }
}